#ifndef MESSAGE_HANDLER_H
#define MESSAGE_HANDLER_H

#include "client_manager.h"
#include "response_handler.h"
#include <libwebsockets.h>
#include "websocket_handler.h"

int init_client_session(struct per_session_data__custom *pss, 
                        struct lws *wsi, VHostData *vhd);
void handle_connection_closed(struct per_session_data__custom *pss, 
                              VHostData *vhd, struct lws *wsi);
void handle_received_message(struct lws *wsi, 
                             struct per_session_data__custom *pss,
                             VHostData *vhd, void *in, size_t len);
void handle_action(const char *action, struct lws *wsi, 
                  struct per_session_data__custom *pss,
                  VHostData *vhd, struct json_object *json);

#endif